<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>子代选择器</title>
</head>
<body>
      <style>
        div > span{
            color: red;
        }
      </style>
</body>
    <span>span 标签</span>

    <div>
        <span>这是div的儿子</span>
        <p>
        <span>这是div的孙子</span>
        </p>
    </div>
</html>